package com.cskaoyan.mapper;

import com.cskaoyan.bean.system.Admin;
import com.cskaoyan.bean.system.AdminExample;
import com.cskaoyan.bo.system.AdminCreateBo;
import com.cskaoyan.bo.system.AdminListBo;
import com.cskaoyan.vo.system.AdminCreateVo;
import com.cskaoyan.vo.system.AdminListItemVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdminMapper {
    long countByExample(AdminExample example);

    int deleteByExample(AdminExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Admin record);

    int insertSelective(Admin record);

    List<Admin> selectByExample(AdminExample example);

    Admin selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Admin record, @Param("example") AdminExample example);

    int updateByExample(@Param("record") Admin record, @Param("example") AdminExample example);

    int updateByPrimaryKeySelective(Admin record);

    int updateByPrimaryKey(Admin record);

    // 自己写的

    List<AdminListItemVo> selectAdminList(@Param("adminListBo") AdminListBo adminListBo);

    int insertAdmin(@Param("adminCreateBo") AdminCreateBo adminCreateBo);

    AdminCreateVo selectAdminById(@Param("id") Integer id);

    int updateAdmin(@Param("adminCreateBo") AdminCreateBo adminCreateBo);

    int deleteByIdLogically(@Param("id") Integer id);

    String selectPswByUsername(@Param("username") String username);

    AdminCreateBo selectTempInfo(@Param("username") String username);

}